package com.uw.uwrpc.core.transport;


import com.uw.uwrpc.core.api.RpcRequest;
import com.uw.uwrpc.core.api.RpcResponse;
import com.uw.uwrpc.core.provider.ProviderInvoker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class SpringBootTransport {

    @Autowired
    private ProviderInvoker providerInvoker;
    @RequestMapping("/uwrpc")
    public RpcResponse<?> invoke(@RequestBody RpcRequest rpcRequest) {
        return providerInvoker.invoke(rpcRequest);
    }


}
